import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/user/login',
    method: 'post',
    data
  })
}
export function SaveUser(data) {
  return request({
    url: '/user',
    method: 'post',
    data
  })
}
export function GetList(param) {
  return request({
    url: '/user/page',
    method: 'get',
    params:param
  })
}
export function Remove(id) {
  return request({
    url: '/user/'+id,
    method: 'delete',
  })
}
export function GetXQUsers(text) {
  return request({
    url: '/user/like/'+text,
    method: 'get',
  })
}
export function getInfo(token) {
  console.log(token)
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/vue-element-admin/user/logout',
    method: 'post'
  })
}
